package exception;

public class ThrowDemo {
    public static void main(String[] args){
        System.out.println("开始执行...");
        try {
            Person p = new Person();
            p.setAge(-1);
            System.out.println(p.getAge());
        } catch (IllegalAgeException e) {
            e.printStackTrace();
        }
        System.out.println("程序正常结束...");
    }
}
